package com.zttek.videoShareProject.modules.service.impl;

import com.zttek.videoShareProject.modules.model.Abuse;
import com.zttek.videoShareProject.modules.mapper.AbuseMapper;
import com.zttek.videoShareProject.modules.service.IAbuseService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author CBY
 * @since 2018-07-03
 */
@Service
public class AbuseServiceImpl extends ServiceImpl<AbuseMapper, Abuse> implements IAbuseService {

    @Autowired
    private AbuseMapper abuseMapper;

    public  void addAbuse(Abuse abuse) throws Exception {
        abuse.setStatus(0);
        abuse.setCreateDate(new Date());
        abuseMapper.insert(abuse);
    }
}
